import React from 'react';

export default (props) => {
  var items = props.items,
    speed = props.speed,
    index = props.index,
    forRef = props.forRef,
    width = props.width,
    height = props.height;
  var style = {
    width: (items.length + 1) * width + 'px',
    height: height + 'px',
    left: index * width * -1 + 'px',
    transition: 'left ' + speed + 's linear',
  };
  var boxStyle = {
    width: width + 'px',
    height: height + 'px',
  };
  return React.createElement(
    'ul',
    { ref: forRef, style: style },
    items.map(function (item, index) {
      return React.createElement(
        'li',
        { key: 'img' + index, style: boxStyle },
        React.createElement('img', { src: item.src, style: boxStyle, key: index }),
      );
    }),
    React.createElement(
      'li',
      { style: boxStyle },
      React.createElement('img', { style: boxStyle, src: items[0].src }),
    ),
  );
};
